/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.jboss.seam.example.booking.entityquery;

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.security.Restrict;
import org.jboss.seam.example.booking.entity.User;
import org.jboss.seam.framework.EntityQuery;

/**
 *
 * @author RHO
 */
@AutoCreate
@Name("userQuery")
@Scope(ScopeType.EVENT)
@Restrict("#{identity.loggedIn}")
public class UserQuery extends EntityQuery<User>{
    
    public UserQuery() {
		super();
		setEjbql("SELECT r FROM User r");
		setMaxResults(25);
	}
	
	
	
}
